-- GENERATED SPELL FOR [Silithid Invader] --


function spell0_4131(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(6016,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4131', 20000, 1)
end

function spell1_4131(pUnit, Event) --@Silithid Pox,n/a--
pUnit:FullCastSpellOnTarget(8137,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4131', 2000, 1)
end

function Sorts_4131(pUnit, Event)
local choix_sorts_4131 = math.random(0, 1)
if choix_sorts_4131 == 0 then
pUnit:RegisterEvent('spell0_4131', 1, 1)
end
if choix_sorts_4131 == 1 then
pUnit:RegisterEvent('spell1_4131', 1, 1)
end
end

function mob4131_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4131', math.random(1500, 3000), 1)
end

function mob4131_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4131_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4131_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4131, 1, 'mob4131_Action')
RegisterUnitEvent(4131, 2, 'mob4131_Leave')
RegisterUnitEvent(4131, 3, 'mob4131_Kill')
RegisterUnitEvent(4131, 4, 'mob4131_Die')
